package by.dvrudenko.avtobaza.services;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import org.springframework.transaction.annotation.Transactional;

import by.dvrudenko.avtobaza.dataaccess.en.Restriction;
import by.dvrudenko.avtobaza.datamodel.Car;
import by.dvrudenko.avtobaza.datamodel.Driver;

public interface DriverService {
	
	Driver get(Long id);
	
	Long getCount();
	
	List<Driver> getAllDriver();
	
	List<Driver> getAllDriverWork(Boolean work); 
	
	List<Driver> getAllDriverByAge(Timestamp date, Restriction condition);
	
/*	List<Driver> getAllDriverByExperience(Timestamp experience , Restriction condition); */
	
    List<Driver> getAllDrivers(SingularAttribute<Driver, ?> attr, boolean ascending, int startRecord, int pageSize);
	
	@Transactional
	void saveOrUpdate(Driver user);

	@Transactional
	void delete(Driver user);

	@Transactional
	void deleteAll();
	
	@Transactional
	void changeDriverWorkStatus(Long id , Boolean bool);
	
	Driver getRandomDriver();
	
	Integer getAcomplishRoutesByDriverId(Long id);
	
	String getRootFolder() ;
	 
	Driver getDriverByUserId(Long id);
}
